package cn.linran.feignclient;

import cn.linran.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 调用user-server接口
 */
@FeignClient(value = "user-server",fallbackFactory = UserFeignClientFallbackFactory.class) // 表示是feign接口
public interface UserFeignClient {
    /**
     * 复制user的接口，删除方法体
     * @param id
     * @return
     */
    @GetMapping("/getById/{id}")
    User getById(@PathVariable("id") Long id);

}